<!DOCTYPE html>
<html>
	<head>
	    <meta charset="utf-8">
	    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
	    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
	    <title>Hello APP</title>
	    <link rel="stylesheet" type="text/css" href="../../../css/index.css" />
	</head>
	<style type="text/css">
		.warp{width: 100%;}
		.tishi-box{width: 100%;height: auto;padding: 15px;box-sizing: border-box;background: #FF9502;font-size: 15px;color: #ffffff;}

		.info-box{width: 100%;margin-bottom: 10px;}
		.info-box .info-one{align-items: center;padding:15px;background: #FFFFFF;box-sizing: border-box;}
		.info-box .info-one .text{font-size: 15px;}
		.info-box .info-one .cont{font-size: 15px;color: #666666;padding-left: 20px;text-align: right;}

		.sku-box{background: #ffffff;padding: 0 15px;box-sizing: border-box;}
		.sku-box .t{font-size: 15px;padding-top: 10px;}
		.sku-box .sku-list .sku-one{padding: 10px 0;box-sizing: border-box;}
		.sku-box .sku-list .sku-one .info{font-size: 15px;color: #666666;padding-bottom: 4px;}
		.sku-box .sku-list .sku-one span:nth-child(1){font-size: 15px;color: #666666;margin-right: 50px;}

	</style>
	<body>
		<div id="vue" class="warp">
			<div class="tishi-box" :style="{ display:(Pdata.forced_down == 1 ? '':'none')}">
			强制下架原因:<i v-text="Pdata.forced_down_msg"></i>
			</div>
			<div class="info-box">
	        	<div class="info-one flex border-bottom">
	        		<div class="text">商品标题</div>
					<div class="cont flex1" v-text="Pdata.title"></div>
	        	</div>
				<div class="info-one flex border-bottom">
	        		<div class="text">副标题</div>
					<div class="cont flex1" v-text="Pdata.tit"></div>
	        	</div>
				<div class="info-one flex border-bottom">
	        		<div class="text">商品分类</div>
					<div class="cont flex1" v-text="Pdata.cateid_str"></div>
	        	</div>
				<div class="info-one flex">
	        		<div class="text">所属商家</div>
					<div class="cont flex1" v-text="Pdata.pinpai_name"></div>
	        	</div>
	        </div>
			<div class="info-box">
	        	<div class="info-one flex border-bottom" v-if="Pdata.isguige == 1">
	        		<div class="text">商品编码</div>
					<div class="cont flex1" v-text="Pdata.gdata[0].code"></div>
	        	</div>
				<div class="info-one flex border-bottom">
	        		<div class="text">上架状态</div>
					<div class="cont flex1" v-if="Pdata.isjia == 1">已上架</div>
					<div class="cont flex1" v-if="Pdata.isjia == 0">待上架</div>
	        	</div>
				<div class="info-one flex border-bottom">
	        		<div class="text">市场参考价</div>
					<div class="cont flex1">¥<i v-text="Pdata.scprice"></i></div>
	        	</div>
				<div class="info-one flex border-bottom" v-if="Pdata.isguige == 1">
	        		<div class="text">商品售价</div>
					<div class="cont flex1">¥<i v-text="Pdata.gdata[0].price"></i></div>
	        	</div>
				<div class="info-one flex border-bottom" v-if="Pdata.isguige == 1">
	        		<div class="text">库存</div>
					<div class="cont flex1"><i v-text="Pdata.gdata[0].num"></i><i>件</i></div>
	        	</div>
				<div class="info-one flex" v-if="Pdata.isguige == 1">
	        		<div class="text">重量</div>
					<div class="cont flex1"><i v-text="Pdata.gdata[0].kg"></i>kg</div>
	        	</div>
				<div class="sku-box" v-if="Pdata.isguige == 2">
					<div class="t">SKU类型</div>
					<div class="sku-list" v-for="(item,key) in Pdata.gdata">
						<div class="sku-one border-bottom">
							<div class="info">商品编码：<i v-text="item.code"></i></div>
							<div class="info">
								<span v-text="item.ggstr"></span><span>库存：<i v-text="item.num"></i><i>件</i></span>
							</div>
							<div class="info">商品重量：<i v-text="item.kg"></i>kg</div>
							<div class="info">售价：¥<i v-text="item.price"></i></div>
						</div>
					</div>
				</div>
	        </div>
		</div>
	</body>
</html>
<script type="text/javascript" src="../../../script/base.min.js" id="loadjs" data-js="L/swiper.min,L/lazyload,L/h-tool"></script>
<script type="text/javascript">

	define(function (require, exports, module) {
		pageParam = api.pageParam;
		var link = 'store/Goods/show';

		_page.getData = function(loading) {
			if(pageParam.type == 'jifen'){
				link = 'store/ScoreGoods/show';
			}
			lanYun.getVueData({url:link,get:{id:pageParam.id},cache:0,loading:loading},function(ret) {
				//console.log(JSON.stringify(ret))
				if(ret.errcode != 0){
					lanYun.toast(ret.mag);
				}
			});
		};

		lanYun.newVue('#vue',{},function() {
			_page.getData(2);
		});
	});
</script>
